import React from 'react'
import MarkdownView from 'react-showdown'
import style from './css/table.module.scss' 
import code from './Code'
// TODO video 处理
export default function index2({ md, components={} }) {
    return (
        <MarkdownView
            markdown={md}
            options={{ tables: true, emoji: true }}
            components={{
                p: 'div',
                code,   
                table({ children }) {
                    return <table className={style.table}>{children}</table>
                },
                ...components
            }}
        />
    )
}
